﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="UserAdd.aspx.cs" Inherits="User_UserAdd" Title="添加用户" %>

<%@ Register assembly="Coolite.Ext.Web" namespace="Coolite.Ext.Web" tagprefix="ext" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                ConnectionString="<%$ ConnectionStrings:CXDB %>" 
                SelectCommand="SELECT [ID], [DeptName] FROM [CX_SYS_Dept]">

            </asp:SqlDataSource>
    <ext:ViewPort ID="ViewPort1" runat="server">
        <Body>
            <ext:BorderLayout ID="BorderLayout1" runat="server">
                <Center>
                     <ext:FormPanel  ID="FormPanel1" runat="server" BodyStyle="padding:5px;" 
        ButtonAlign="Right" Frame="true" BaseCls="x-plan" >
        <body>
            
            <ext:Store ID="Store1"  DataSourceID="SqlDataSource1"  AutoLoad="true"  runat="server">
            <Reader>
                <ext:JsonReader ReaderID="ID">
                    <Fields>
                        <ext:RecordField Name="DeptName" Type="String"></ext:RecordField>
                        <ext:RecordField Name="ID" Type="Int"></ext:RecordField>
                    </Fields>
                </ext:JsonReader>
            </Reader>
            </ext:Store>
           <ext:FormLayout ID="FormLayout1" runat="server">
                <ext:Anchor Horizontal="100%">
                    <ext:TextField ID="TfUsername" runat="server" FieldLabel="用户名">
                    </ext:TextField>
                </ext:Anchor>
                <ext:Anchor Horizontal="100%">
                    <ext:TextField ID="TfPassWD1" InputType="Password"   runat="server" FieldLabel="密码">
                    </ext:TextField>
                </ext:Anchor>
                <ext:Anchor Horizontal="100%">
                    <ext:TextField ID="TfPassWD2"  InputType="Password"  runat="server" FieldLabel="重复密码">
                    </ext:TextField>
                </ext:Anchor>
                
                <ext:Anchor Horizontal="100%">
                    <ext:ComboBox  ID="ComboBox1"
                                    runat="server"  
                                    EmptyText="选择一个部门"
                                    FieldLabel="部门"
                                    TriggerAction="All"
                                    StoreID="Store1"
                                    Editable="false"
                                    TypeAhead="true" 
                                    Resizable="true"
                                    SelectOnFocus="true"
                                    DisplayField="DeptName" 
                                    ValueField="ID" >

                    </ext:ComboBox>
                    
                </ext:Anchor>
               
                <ext:Anchor Horizontal="100%">
                    <ext:Checkbox ID="Checkbox7" FieldLabel="领导"    runat="server">
                            </ext:Checkbox>
                </ext:Anchor>
                
            </ext:FormLayout>
        </body>
        <buttons>
            <ext:Button ID="Button1" runat="server" Icon="Accept" Text="提交">
            <AjaxEvents>
                <Click OnEvent="AddUser">
                    <EventMask ShowMask=true Msg="提交中..." />
                </Click>
            </AjaxEvents>
            </ext:Button>
        </buttons>
         
    </ext:FormPanel>
                </Center>
            </ext:BorderLayout>
        </Body>
    </ext:ViewPort>
       
  
</asp:Content>

